package part7;

/**
 * @author wcj
 * @Date 2021/5/15 15:08
 * @Version 1.0
 */
public class Part74 extends BoardGame {

    public Part74() {
        super(1);
    }

    public static void main(String[] args) {
        Part74 part74 = new Part74();
    }
}

class Game {
    /**
     * 当基类没有默认构造器，有带构造器时，需要我们在导出类的构造器首行就调用基类的带参构造器，这样才能保证基类的初始化
     *
     * @param i
     */
    public Game(int i) {
        System.out.println("Game");
    }
}

class BoardGame extends Game {
    public BoardGame(int i) {
        super(5);
        System.out.println("BoardGame");
    }
}


